The invention is in the field of microscopy in which focus of an image, observed by way of a microscope, is automatically adjusted. Such automatic adjustment of microscope focus is termed "autofocus". The invention is practiced in an autofocus system. More particularly, the invention concerns the incorporation of an analog circuit that accounts for the effect of a transfer function attributable to the microscope optics of the autofocus system, eliminates scanning artifacts that impair the autofucus function, and corrects for illumination instability.
Autofocus is essential in automated microscopy to overcome the problems of mechanical instability, the irregularity of glass slides and coverslips, the movement of live specimens and the effects of thermal expansion. Autofocus can overcome these limitations and allow accurate and reproducible measurements in fully automated quantitative microscopy. Many experiments will benefit from autofocus and examples for which it is indispensable include:
(a) scanning large areas at high resolution where depth of field is limited (e.g. cervical cancer screening, with 10,000 microscope fields per slide). PA1 (b) time-lapse experiments (e.g. hours to days). PA1 (c) time-lapse scanning cytometry combining (a) and (b), where autofocus speed becomes a fundamental determinant of temporal resolution.
Whatever the source of instability, autofocus will compensate if the positional variations have longer time constants than the autofocus correction.
An autofocus system typically includes an automated microscope including magnifying optics and an adjustable stage on which a microscope slide is mounted for magnified observation of a specimen on the slide. Motors coupled to the stage provide horizontal adjustment of the location of the stage. Means are provided for vertial (Z-axis) adjustment between the magnifying optics and stage. These may include an arrangement for adjusting the Z-axis position of an objective lens, or by Z-axis adjustment of the stage. A camera receives a magnified image via the magnifying optics and provides an electronic signal representing the magnified image to autofocus electronics. The autofocus electronics process the signal according to a function that indicates the degree of focus, providing an adjustment (or error) signal to the vertical adjustment means. In response, the vertical adjustment means adjusts the vertical position of the objective lens or the stage, changing the focus of the magnified image. Other circuit may be included in an autofocus system for automatic translation (scanning) of a specimen on the slide.
Several methods have been tested for autofocus, including resolution, contrast and entropy. It has recently been shown that a measurement of optical resolution performs autofocus robustly and accurately. Price, J. H. and Gough, D. G., "Comparison of Phase-Contrast and Fluorescence Digital Autofocus for Scanning Microscopy," Cytometry 16, pp. 283-297, 1994. This experimental evidence reinforces the following logical definition: the highest resolution occurs at best focus. Details blur as an image is defocused and resolution is lost. Resolution can be measured by analyzing the Fourier frequency spectrum with filters that isolate the high frequencies. The sum of the squares of the high frequencies (signal power) can then be used as a measured of resolution. In spectral terms, this can be a highpass or bandpass filter. A typical filter is the implementation of the first derivative of the image intensity. Another is the laplacian filter, which is a measure of the second derivative of the image intensity. The laplacian filter has more predominant highpass characteristics, measuring resolution at a smaller scale. Squaring magnifies the differences between function values.
To compare different criteria, an autofocus system typically computes focus functions as a function of the Z-axis position. A value of the focus function is calculated from an image acquired at each Z-axis position. According to Price et al., a typical equation for the focus function using a digital filter consists of convolving the image i.sub.xy with a one dimensional highpass filter, obtaining the sum of squares and normalizing to reduce the effect of unstable illumination. Such a relationship is given in equation (1). EQU f(z)=.SIGMA..SIGMA.([-1 2-1]*i.sub.xy).sup.2 /[(1/XY of pixels)(.SIGMA..SIGMA.i.sub.xy)].sup.2 (1)
where z=vertical position and i.sub.xy is the intensity at position (x,y).
Analog focus circuits have been reported in Ali Kujoory, M., Mayall, B. H. and Mendelsohn, M. L., "Focus-Assist Device for a Flying-Spot Microscope," IEEE Transactions on Biomedical Engineering, 20(2), pp. 126-32, 1973, and in Johnson, E. T. and Goforth, L. J., "Metaphase Spread Detection and Focus Using Closed Circuit Television", Journal of Histochemistry and Cytochemistry, 22(7), pp. 536-587, 1974. McKeogh, L., Sharpe, J., and Johnson, K., in "A Low-Cost Automatic Translation and Autofocusing System for a Microscope", Meas. Sci. Technol., 6, pp. 583-587, 1995, describe an analog circuit for autofocus in microscopy. These designs, however do not take into account the effect of the autofocus system transfer function in the choice of the high frequency filter. Additional important features not considered in these previous implementations include the filter end effects between horizontal lines in the video signal and normalization for correction of illumination instability. Further, in low information content images, background intensity changes can dominate via filter distortion at the ends of horizontal lines.